'use strict';
const {
  Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
  class Category_Service extends Model {
    /**
     * Helper method for defining associations.
     * This method is not a part of Sequelize lifecycle.
     * The `models/index` file will call this method automatically.
     */
    static associate(models) {
      // define association here
      models.Category_Service.belongsTo(models.Category)
      models.Category_Service.belongsTo(models.Service)
      models.Category_Service.belongsTo(models.Bank)
      models.Category_Service.belongsTo(models.Circulation)
      models.Category_Service.belongsTo(models.Type)
      models.Category_Service.belongsTo(models.Risk)
    }
  }
  Category_Service.init({
    categoryId: DataTypes.INTEGER,
    serviceId: DataTypes.INTEGER,
    circulationId: DataTypes.INTEGER,
    typeId: DataTypes.INTEGER,
    riskId: DataTypes.INTEGER,
    timeLimit: DataTypes.INTEGER,
    bankId: DataTypes.INTEGER
  }, {
    sequelize,
    modelName: 'Category_Service',
  });
  return Category_Service;
};